import javafx.application.Application;
import javafx.scene.canvas.Canvas;
import javafx.scene.Scene;
import javafx.scene.Group;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
import javafx.scene.canvas.GraphicsContext;

public class Question9 extends Application
{
    public static final int WINDOW_WIDTH = 400;
    public static final int WINDOW_HEIGHT = 300;

    public static final int FACE_DIAMETER = 100;
    public static final int X_BLUE_CIRCLE = 100;
    public static final int Y_BLUE_CIRCLE = 50;
    public static final int X_YELLOW_CIRCLE = 150;
    public static final int Y_YELLOW_CIRCLE = 50;
    public static final int X_BLACK_CIRCLE = 200;
    public static final int Y_BLACK_CIRCLE = 50;
    public static final int X_GREEN_CIRCLE = 125;
    public static final int Y_GREEN_CIRCLE = 100;
    public static final int X_RED_CIRCLE = 175;
    public static final int Y_RED_CIRCLE = 100;

    public static void main(String[] args)
    {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) throws Exception
    {

        Group root = new Group();
        Scene scene = new Scene(root);

        Canvas canvas = new Canvas(WINDOW_WIDTH, WINDOW_HEIGHT);
        GraphicsContext gc = canvas.getGraphicsContext2D();

        // BLUE_CIRCLE
        gc.setStroke(Color.BLUE);
        gc.strokeOval(X_BLUE_CIRCLE, Y_BLUE_CIRCLE, FACE_DIAMETER, FACE_DIAMETER);

        // YELLOW_CIRCLE
        gc.setStroke(Color.YELLOW);
        gc.strokeOval(X_YELLOW_CIRCLE, Y_YELLOW_CIRCLE, FACE_DIAMETER, FACE_DIAMETER);

        // BLACK_CIRCLE
        gc.setStroke(Color.BLACK);
        gc.strokeOval( X_BLACK_CIRCLE,  Y_BLACK_CIRCLE, FACE_DIAMETER, FACE_DIAMETER);

        // GREEN_CIRCLE
        gc.setStroke(Color.GREEN);
        gc.strokeOval(X_GREEN_CIRCLE, Y_GREEN_CIRCLE, FACE_DIAMETER, FACE_DIAMETER);

        // RED_CIRCLE
        gc.setStroke(Color.RED);
        gc.strokeOval(X_RED_CIRCLE, Y_RED_CIRCLE, FACE_DIAMETER, FACE_DIAMETER);




        root.getChildren().add(canvas);
        primaryStage.setTitle("Five_Circle in JavaFX");
        primaryStage.setScene(scene);
        primaryStage.show();
    }
}
